.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#m3u8-url {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#play-btn, #scan-btn {
    padding: 8px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#scan-btn {
    background-color: #2196F3;
}

#play-btn:hover {
    background-color: #45a049;
}

#scan-btn:hover {
    background-color: #1976D2;
}

.url-list-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.url-list-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.url-count {
    color: #666;
    font-size: 14px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.url-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 4px;
}

.url-list li {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    word-break: break-all;
}

.url-name {
    font-weight: bold;
    color: #333;
    font-size: 15px;
    display: block;
}

.url-link {
    color: #666;
    font-size: 13px;
    display: block;
    word-break: break-all;
    font-family: monospace;
}

.url-list li:hover .url-name {
    color: #2196F3;
}

.url-list li.active .url-name {
    color: #2196F3;
}

.url-list li.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding-left: 16px;
}

.url-list li:last-child {
    border-bottom: none;
}

.url-list li:hover {
    background-color: #f5f5f5;
}

.player-container {
    width: 100%;
    margin-top: 20px;
    /* 移除相对定位，因为现在不需要相对定位来控制位置 */
}

#video-player {
    width: 100%;
    background: #000;
}

.ts-info {
    /* 移除绝对定位 */
    /* position: absolute; */
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    /* 添加外边距，让信息显示在播放器下方 */
    margin-top: 10px;
    text-align: center; 
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-text {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #play-btn {
        width: 100%;
    }
}

.main-content {
    display: flex;
    gap: 20px;
}

.ts-list-container {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

.ts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ts-list li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    word-break: break-all;
}

.ts-list li:hover {
    background-color: #f5f5f5;
}

.ts-list li.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding-left: 12px;
}

.player-container {
    flex: 3;
    margin-top: 0;
}